<%--
  Created by IntelliJ IDEA.
  User: 鱼
  Date: 2021/4/27 0027
  Time: 10:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path=request.getContextPath()+"/"; %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html class="x-admin-sm">
<head>
    <base href="<%=path%>" >
    <meta charset="UTF-8">
    <title>纳税、借款、担保及或有负债情况</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="layui/css/font.css">
    <link rel="stylesheet" href="layui/css/xadmin.css">
    <script src="layui/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="layui/js/xadmin.js"></script>
    <script type="text/javascript" src="layui/js/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th colspan="8" style="font-size: 16px;font-weight: bold;">
                                (一)纳税情况
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr align="center">
                            <td width="110">
                                企业执行的主要税种及税率
                            </td>
                            <td colspan="7"  align="left">
                                <table >
                                    <tr align="center">
                                        <td >
                                            序号
                                        </td>
                                        <td>
                                            税种
                                        </td>
                                        <td>
                                            计税依据
                                        </td>
                                        <td >
                                            税率
                                        </td>
                                        <td>
                                            备注
                                        </td>
                                    </tr>
                                    <c:forEach items="${data.taxations}" var="taxation" varStatus="vs">
                                    <tr align="center">
                                        <td>
                                            ${vs.count}
                                        </td>
                                        <td>
                                            <c:if test="${taxation.taxCategory==1}">增值税</c:if>
                                            <c:if test="${taxation.taxCategory==2}">城市维护建设税</c:if>
                                            <c:if test="${taxation.taxCategory==3}">教育费附加</c:if>
                                            <c:if test="${taxation.taxCategory==4}">地方教育费附加</c:if>
                                            <c:if test="${taxation.taxCategory==5}">企业所得税</c:if>
                                        </td>
                                        <td>
                                            <c:if test="${taxation.taxCategory==1}">销售货物等</c:if>
                                            <c:if test="${taxation.taxCategory==2}">实缴流转税额</c:if>
                                            <c:if test="${taxation.taxCategory==3}">实缴流转税额</c:if>
                                            <c:if test="${taxation.taxCategory==4}">实缴流转税额</c:if>
                                            <c:if test="${taxation.taxCategory==5}">应纳税所得额</c:if>
                                        </td>
                                        <td>
                                            <input type="text" name="email" required="" lay-verify="" autocomplete="off" class="layui-input" value="${taxation.taxRate}">
                                        </td>
                                        <td>
                                            <input type="text" name="email" required="" lay-verify="" autocomplete="off" class="layui-input" value="${taxation.note}">
                                        </td>
                                    </tr>
                                    </c:forEach>

                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                享受的税收优惠政策
                            </td>
                            <td colspan="7">
                                   <textarea placeholder="暂无数据" name="desc" class="layui-textarea">
                                        ${data.tdBlobs.preferentialTaxPolicies}
                                   </textarea>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="8" style="font-size: 16px;font-weight: bold;">
                                (二)借款、 担保及或有负债
                            </td>

                        </tr>
                        <tr align="center">
                            <td>
                                截止<span id="datetime"></span>的借款余额
                            </td>
                            <td colspan="7">
                                <table align="center">
                                    <tr align="center">
                                        <td>
                                            序号
                                        </td>
                                        <td width="260">
                                            借款金额
                                        </td>
                                        <td width="260">
                                            借款期限
                                        </td>
                                        <td width="260">
                                            借款机构
                                        </td>
                                        <td>
                                            备注
                                        </td>
                                    </tr>
                                    <c:forEach items="${data.debts}" var="debt" varStatus="vs">
                                    <tr align="center">
                                        <td>
                                            ${vs.count}
                                        </td>
                                        <td>
                                            <input type="text" name="email" required="" lay-verify="" autocomplete="off" class="layui-input" value="${debt.loanAmount}">
                                        </td>
                                        <td>
                                            <input type="text" name="email" required="" lay-verify="" autocomplete="off" class="layui-input" value="${debt.loanTime}">
                                        </td>
                                        <td>
                                            <input type="text" name="email" required="" lay-verify="" autocomplete="off" class="layui-input" value="${debt.borrowingInstitution}">
                                        </td>
                                        <td>
                                            <input type="text" name="email" required="" lay-verify="" autocomplete="off" class="layui-input" value="${debt.note}">
                                        </td>
                                    </tr>
                                    </c:forEach>
                                    <tr align="right">
                                        <td colspan="6">
                                            <div>
                                                <button class="layui-btn">
                                                    <i class="layui-icon"></i>
                                                </button>
                                            </div>
                                        </td>
                                        <!-- <td style="border-left: none;">

                                         </td>-->
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr align="center">
                            <td rowspan="2">
                                描述企业存在的对外担保及可能产生重大影响的诉讼或仲裁/或上传相关资料附件
                            </td>
                            <td colspan="7">
                                 <textarea placeholder="请输入内容" id="desc" name="desc" class="layui-textarea">
                                       ${data.tdBlobs.levelDescription}
                                   </textarea>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="7">
                                <button type="button" class="layui-btn" id="test3"><i class="layui-icon"></i>上传相关附件</button>
                            </td>
                        </tr>

                        <tr align="center">
                            <td colspan="8">
                                <button class="layui-btn" lay-filter="add" lay-submit="">保存</button>
                                <button class="layui-btn" lay-filter="add" lay-submit="">提交</button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    setInterval("document.getElementById('datetime').innerHTML=new Date().toLocaleString();", 1000);
</script>
<script>
    layui.use(['laydate','form','upload'], function(){
        var laydate = layui.laydate;
        var  form = layui.form;
        var $ = layui.jquery;
        var upload = layui.upload;

        // 监听全选
        form.on('checkbox(checkall)', function(data){

            if(data.elem.checked){
                $('tbody input').prop('checked',true);
            }else{
                $('tbody input').prop('checked',false);
            }
            form.render('checkbox');
        });
        //指定允许上传的文件类型
        upload.render({
            elem: '#test3'
            ,url: 'https://httpbin.org/post' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,done: function(res){
                layer.msg('上传成功');
                console.log(res);
            }
        });
        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });


    });

    /*用户-停用*/
    function member_stop(obj,id){
        layer.confirm('确认要停用吗？',function(index){

            if($(obj).attr('title')=='启用'){

                //发异步把用户状态进行更改
                $(obj).attr('title','停用')
                $(obj).find('i').html('&#xe62f;');

                $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                layer.msg('已停用!',{icon: 5,time:1000});

            }else{
                $(obj).attr('title','启用')
                $(obj).find('i').html('&#xe601;');

                $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                layer.msg('已启用!',{icon: 5,time:1000});
            }

        });
    }

    /*用户-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }



    function delAll (argument) {
        var ids = [];

        // 获取选中的id
        $('tbody input').each(function(index, el) {
            if($(this).prop('checked')){
                ids.push($(this).val())
            }
        });

        layer.confirm('确认要删除吗？'+ids.toString(),function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
    }
</script>
</html>
